<?php

namespace app\api\model;

use app\common\enums\StatusEnum;
use app\common\controller\Send;

class Package extends \app\common\model\Package
{
    
    use send;
    /**
     * 获取单词包的信息
     * @param $phone
     * @return mixed
     * @throws \think\Exception\DbException
     */
    public static function getLangClassWord($data)
    {
        $package = new Package();
        $data = self::getLangClassInfo($data,1);
        if(!$data){
            return self::sendResult(141, [], '没有该信息');
        }else{
            return self::sendResult(self::$okCode, $data,'');
        }
        
        
    }
    
    
    /**
     * 获取句子包的信息
     * @param $phone
     * @return mixed
     * @throws \think\Exception\DbException
     */
    public static function getLangClassSentence($data)
    {
        $package = new Package();
        $data = self::getLangClassInfo($data,2);
        if(!$data){
            return self::sendResult(141, [], '没有该信息');
        }else{
            return self::sendResult(self::$okCode, $data,'');
        }
    
    
    }
}